<!-- Copyright 2023 The ChromiumOS Authors
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->

<head>
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/d3-flame-graph@4.1.3/dist/d3-flamegraph.css">
</head>
<body>
  <div id="chart"></div>
  <script type="text/javascript" src="https://d3js.org/d3.v7.js"></script>
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/d3-flame-graph@4.1.3/dist/d3-flamegraph.min.js"></script>
  <script type="text/javascript">
  var chart = flamegraph()
    .width(960);
  chart.selfValue(true);

  d3.json("./src/tracing_data.json")
    .then(data => {
      d3.select("#chart")
        .datum(data)
        .call(chart);
    }).catch(error => {
      return console.warn(error);
    });
  </script>
</body>
